package com.pactera.madp.cp.controller.sidebar.marketing;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.service.MarketingArticleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (McMarketingArticle)表控制层
 *
 * @author yushen.qi
 * @since 2021-05-24 15:30:55
 */
@RestController
@RequestMapping("/marketingarticlewechat")
@Api(value = "marketingArticleWechat", tags = "营销素材-文章管理侧边栏")
public class MarketingArticleSidebarController {

    /**
     * 服务对象
     */
    @Resource
    private MarketingArticleService marketingArticleService;

    @GetMapping("/page")
    @ApiOperation(value = "文章标题模糊分页查询")
    public R<IPage> qryPage (Page page, String title, Integer classification) {
        return R.ok(marketingArticleService.selectAllByPageOrName(page,title,classification));
    }

}
